<form class="layui-form mt20">
    <div class="layui-form-item">
        <label class="layui-form-label">上级</label>
        <div class="layui-input-inline">
            <select name="pid" lay-filter="pid">
                <option value="0|0">作为一级栏目</option>
                {volist name="categorys" id="node"}
                <option value="{$node.id}|{$node.level}"{eq name='node.id' value='$category.pid'} selected{/eq}>{php}echo str_repeat("&nbsp;&nbsp;",$node['level']).dec2roman($node['level']);{/php}—{$node.name}</option>
                {/volist}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"><cite class="fcRed mr5">*</cite></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">栏目类型</label>
        <div class="layui-input-inline">
            <select name="type" lay-filter="editType">
                {volist name="Think.config.category.type" id="type"}
                <option value="{$key}"{eq name='category.type' value='$key'} selected{/eq}>{$type}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="layui-form-item" id="edit-model">
        <label class="layui-form-label">所属模型</label>
        <div class="layui-input-inline">
            <select name="model_id" lay-filter="model">
                {volist name="Think.config.category.model" id="model"}
                <option value="{$key}"{eq name='category.model_id' value='$key'} selected{/eq}>{$model}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">栏目标题</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" lay-verify="required" name="name" value="{$category.name}">
        </div>
    </div>

    <div class="layui-form-item hidden" id="edit-url">
        <label class="layui-form-label">链接地址</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="url" placeholder="请输入外部链接地址" value="{$category.url}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">栏目排序</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="sort"   placeholder="20"  value="{$category.sort}">
        </div>
    </div>
    <div class="layui-input-block">
        <input type="hidden" name="id" value="{$category.id}">
        <a class="layui-btn save-btn layui-btn-normal" lay-filter="save" lay-submit>保存</a>
        <input type="reset" class="layui-btn layui-btn-primary goback" value="重置">
    </div>
</form>
